package cfdt.ldl.web.controller.bus;

import cfdt.common.exception.CodeException;
import cfdt.common.vo.PageBaseResponse;
import cfdt.ldl.web.api.request.GetLawyerInfoListWebRequest;
import cfdt.ldl.web.api.vo.LawyerInfoLessVO;
import cfdt.ldl.web.service.bus.LawyerInfoWebService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;


@Tag(name = "律师控制器", description = "律师相关接口")
@RestController
@RequestMapping("/bus/lawyerInfo")
public class LawyerInfoWebController {

    @Autowired
    private LawyerInfoWebService lawyerInfoService;

    @Operation(summary = "获取律师列表", description = "获取律师列表")
    @PostMapping("/getList")
    @ResponseBody
    public PageBaseResponse<LawyerInfoLessVO> getList(@RequestBody @Valid GetLawyerInfoListWebRequest request) throws CodeException {
        // 响应
        return lawyerInfoService.getList(request);
    }


}
